<?
	ob_start();
	include '../model/database.php';
	include '../model/xl_dia_diem.php';
	
	$xl_dia_diem = new xl_dia_diem();
	
	$tenDiaDiem = $_REQUEST['PlaceRevision_Name'];
	$maNhomDiaDiem = $_REQUEST['PlaceRevision_Group'];
	$dienThoai = $_REQUEST['PlaceRevision_Phone'];
	$webSite = $_REQUEST['PlaceRevision_Website'];
	$maTinhThanh = $_REQUEST['tinhthanh'];
	$maQuanHuyen = $_REQUEST['Quan'];
	$kinhDo = $_REQUEST['Lng'];
	$viDo = $_REQUEST['Lat'];
	$maNguoiDung = $_REQUEST['usid'];
	$moTa = $_REQUEST['noidung'];
	$diaChi = $_REQUEST['PlaceRevision_Address'];
	$domain="http://".$_SERVER['HTTP_HOST'];
	
	if($xl_dia_diem->themDiaDiem($tenDiaDiem,$diaChi,$kinhDo,$viDo,$moTa,$dienThoai,$webSite,$maNguoiDung,$maTinhThanh,$maQuanHuyen,$maNhomDiaDiem)){
		$maDiaDiem = mysql_insert_id();
		header("Location: $domain/doanhiendai/?action=tao-dia-diem-thanh-cong&idPlace=$maDiaDiem");
	}
	

?>